Integrand size = 31, antiderivative size = 194 \[ \int \sec ^2(c+d x) (a+a \sec (c+d x))^4 (A+B \sec (c+d x)) \, dx=\frac {7 a^4 (8 A+7 B) \text {arctanh}(\sin (c+d x))}{16 d}+\frac {4 a^4 (8 A+7 B) \tan (c+d x)}{5 d}+\frac {27 a^4 (8 A+7 B) \sec (c+d x) \tan (c+d x)}{80 d}+\frac {a^4 (8 A+7 B) \sec ^3(c+d x) \tan (c+d x)}{40 d}+\frac {(6 A-B) (a+a \sec (c+d x))^4 \tan (c+d x)}{30 d}+\frac {B (a+a \sec (c+d x))^5 \tan (c+d x)}{6 a d}+\frac {2 a^4 (8 A+7 B) \tan ^3(c+d x)}{15 d} \]
7/16*a^4*(8*A+7*B)*arctanh(sin(d*x+c))/d+4/5*a^4*(8*A+7*B)*tan(d*x+c)/d+27 /80*a^4*(8*A+7*B)*sec(d*x+c)*tan(d*x+c)/d+1/40*a^4*(8*A+7*B)*sec(d*x+c)^3* tan(d*x+c)/d+1/30*(6*A-B)*(a+a*sec(d*x+c))^4*tan(d*x+c)/d+1/6*B*(a+a*sec(d *x+c))^5*tan(d*x+c)/a/d+2/15*a^4*(8*A+7*B)*tan(d*x+c)^3/d
Time = 6.13 (sec) , antiderivative size = 119, normalized size of antiderivative = 0.61 \[ \int \sec ^2(c+d x) (a+a \sec (c+d x))^4 (A+B \sec (c+d x)) \, dx=\frac {a^4 \left (105 (8 A+7 B) \text {arctanh}(\sin (c+d x))+\left (16 (83 A+72 B)+105 (8 A+7 B) \sec (c+d x)+32 (17 A+18 B) \sec ^2(c+d x)+10 (24 A+41 B) \sec ^3(c+d x)+48 (A+4 B) \sec ^4(c+d x)+40 B \sec ^5(c+d x)\right ) \tan (c+d x)\right )}{240 d} \]
(a^4*(105*(8*A + 7*B)*ArcTanh[Sin[c + d*x]] + (16*(83*A + 72*B) + 105*(8*A + 7*B)*Sec[c + d*x] + 32*(17*A + 18*B)*Sec[c + d*x]^2 + 10*(24*A + 41*B)* Sec[c + d*x]^3 + 48*(A + 4*B)*Sec[c + d*x]^4 + 40*B*Sec[c + d*x]^5)*Tan[c + d*x]))/(240*d)
Time = 0.67 (sec) , antiderivative size = 179, normalized size of antiderivative = 0.92, number of steps used = 7, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.226, Rules used = {3042, 4498, 3042, 4489, 3042, 4278, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \sec ^2(c+d x) (a \sec (c+d x)+a)^4 (A+B \sec (c+d x)) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \csc \left (c+d x+\frac {\pi }{2}\right )^2 \left (a \csc \left (c+d x+\frac {\pi }{2}\right )+a\right )^4 \left (A+B \csc \left (c+d x+\frac {\pi }{2}\right )\right )dx\) |
\(\Big \downarrow \) 4498 |
\(\displaystyle \frac {\int \sec (c+d x) (\sec (c+d x) a+a)^4 (5 a B+a (6 A-B) \sec (c+d x))dx}{6 a}+\frac {B \tan (c+d x) (a \sec (c+d x)+a)^5}{6 a d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int \csc \left (c+d x+\frac {\pi }{2}\right ) \left (\csc \left (c+d x+\frac {\pi }{2}\right ) a+a\right )^4 \left (5 a B+a (6 A-B) \csc \left (c+d x+\frac {\pi }{2}\right )\right )dx}{6 a}+\frac {B \tan (c+d x) (a \sec (c+d x)+a)^5}{6 a d}\) |
\(\Big \downarrow \) 4489 |
\(\displaystyle \frac {\frac {3}{5} a (8 A+7 B) \int \sec (c+d x) (\sec (c+d x) a+a)^4dx+\frac {a (6 A-B) \tan (c+d x) (a \sec (c+d x)+a)^4}{5 d}}{6 a}+\frac {B \tan (c+d x) (a \sec (c+d x)+a)^5}{6 a d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {3}{5} a (8 A+7 B) \int \csc \left (c+d x+\frac {\pi }{2}\right ) \left (\csc \left (c+d x+\frac {\pi }{2}\right ) a+a\right )^4dx+\frac {a (6 A-B) \tan (c+d x) (a \sec (c+d x)+a)^4}{5 d}}{6 a}+\frac {B \tan (c+d x) (a \sec (c+d x)+a)^5}{6 a d}\) |
\(\Big \downarrow \) 4278 |
\(\displaystyle \frac {\frac {3}{5} a (8 A+7 B) \int \left (a^4 \sec ^5(c+d x)+4 a^4 \sec ^4(c+d x)+6 a^4 \sec ^3(c+d x)+4 a^4 \sec ^2(c+d x)+a^4 \sec (c+d x)\right )dx+\frac {a (6 A-B) \tan (c+d x) (a \sec (c+d x)+a)^4}{5 d}}{6 a}+\frac {B \tan (c+d x) (a \sec (c+d x)+a)^5}{6 a d}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {\frac {3}{5} a (8 A+7 B) \left (\frac {35 a^4 \text {arctanh}(\sin (c+d x))}{8 d}+\frac {4 a^4 \tan ^3(c+d x)}{3 d}+\frac {8 a^4 \tan (c+d x)}{d}+\frac {a^4 \tan (c+d x) \sec ^3(c+d x)}{4 d}+\frac {27 a^4 \tan (c+d x) \sec (c+d x)}{8 d}\right )+\frac {a (6 A-B) \tan (c+d x) (a \sec (c+d x)+a)^4}{5 d}}{6 a}+\frac {B \tan (c+d x) (a \sec (c+d x)+a)^5}{6 a d}\) |
(B*(a + a*Sec[c + d*x])^5*Tan[c + d*x])/(6*a*d) + ((a*(6*A - B)*(a + a*Sec [c + d*x])^4*Tan[c + d*x])/(5*d) + (3*a*(8*A + 7*B)*((35*a^4*ArcTanh[Sin[c + d*x]])/(8*d) + (8*a^4*Tan[c + d*x])/d + (27*a^4*Sec[c + d*x]*Tan[c + d* x])/(8*d) + (a^4*Sec[c + d*x]^3*Tan[c + d*x])/(4*d) + (4*a^4*Tan[c + d*x]^ 3)/(3*d)))/5)/(6*a)
3.1.72.3.1 Defintions of rubi rules used
Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_), x_Symbol] :> Int[ExpandTrig[(a + b*csc[e + f*x])^m*(d*csc[e + f *x])^n, x], x] /; FreeQ[{a, b, d, e, f, m, n}, x] && EqQ[a^2 - b^2, 0] && I GtQ[m, 0] && RationalQ[n]
Int[csc[(e_.) + (f_.)*(x_)]*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_)*(cs c[(e_.) + (f_.)*(x_)]*(B_.) + (A_)), x_Symbol] :> Simp[(-B)*Cot[e + f*x]*(( a + b*Csc[e + f*x])^m/(f*(m + 1))), x] + Simp[(a*B*m + A*b*(m + 1))/(b*(m + 1)) Int[Csc[e + f*x]*(a + b*Csc[e + f*x])^m, x], x] /; FreeQ[{a, b, A, B , e, f, m}, x] && NeQ[A*b - a*B, 0] && EqQ[a^2 - b^2, 0] && NeQ[a*B*m + A*b *(m + 1), 0] && !LtQ[m, -2^(-1)]
Int[csc[(e_.) + (f_.)*(x_)]^2*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_)*( csc[(e_.) + (f_.)*(x_)]*(B_.) + (A_)), x_Symbol] :> Simp[(-B)*Cot[e + f*x]* ((a + b*Csc[e + f*x])^(m + 1)/(b*f*(m + 2))), x] + Simp[1/(b*(m + 2)) Int [Csc[e + f*x]*(a + b*Csc[e + f*x])^m*Simp[b*B*(m + 1) + (A*b*(m + 2) - a*B) *Csc[e + f*x], x], x], x] /; FreeQ[{a, b, e, f, A, B, m}, x] && NeQ[A*b - a *B, 0] && !LtQ[m, -1]
Time = 6.17 (sec) , antiderivative size = 227, normalized size of antiderivative = 1.17
method | result | size |
norman | \(\frac {\frac {281 a^{4} \left (8 A +7 B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{20 d}-\frac {231 a^{4} \left (8 A +7 B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}}{20 d}+\frac {119 a^{4} \left (8 A +7 B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{9}}{24 d}-\frac {7 a^{4} \left (8 A +7 B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{11}}{8 d}+\frac {a^{4} \left (200 A +207 B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{8 d}-\frac {a^{4} \left (1864 A +1471 B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{24 d}}{\left (-1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )^{6}}-\frac {7 a^{4} \left (8 A +7 B \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{16 d}+\frac {7 a^{4} \left (8 A +7 B \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{16 d}\) | \(227\) |
parallelrisch | \(\frac {22 \left (-\frac {105 \left (A +\frac {7 B}{8}\right ) \left (\frac {2}{3}+\frac {\cos \left (6 d x +6 c \right )}{15}+\frac {2 \cos \left (4 d x +4 c \right )}{5}+\cos \left (2 d x +2 c \right )\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{44}+\frac {105 \left (A +\frac {7 B}{8}\right ) \left (\frac {2}{3}+\frac {\cos \left (6 d x +6 c \right )}{15}+\frac {2 \cos \left (4 d x +4 c \right )}{5}+\cos \left (2 d x +2 c \right )\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{44}+\frac {7 \left (\frac {7 A}{2}+4 B \right ) \sin \left (2 d x +2 c \right )}{11}+\frac {\left (29 A +\frac {769 B}{24}\right ) \sin \left (3 d x +3 c \right )}{22}+\frac {6 \left (13 A +12 B \right ) \sin \left (4 d x +4 c \right )}{55}+\frac {7 \left (A +\frac {7 B}{8}\right ) \sin \left (5 d x +5 c \right )}{22}+\frac {\left (\frac {83 A}{6}+12 B \right ) \sin \left (6 d x +6 c \right )}{55}+\sin \left (d x +c \right ) \left (\frac {125 B}{88}+A \right )\right ) a^{4}}{d \left (10+\cos \left (6 d x +6 c \right )+6 \cos \left (4 d x +4 c \right )+15 \cos \left (2 d x +2 c \right )\right )}\) | \(249\) |
parts | \(-\frac {\left (a^{4} A +4 B \,a^{4}\right ) \left (-\frac {8}{15}-\frac {\sec \left (d x +c \right )^{4}}{5}-\frac {4 \sec \left (d x +c \right )^{2}}{15}\right ) \tan \left (d x +c \right )}{d}+\frac {\left (4 a^{4} A +B \,a^{4}\right ) \left (\frac {\sec \left (d x +c \right ) \tan \left (d x +c \right )}{2}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )}{d}+\frac {\left (4 a^{4} A +6 B \,a^{4}\right ) \left (-\left (-\frac {\sec \left (d x +c \right )^{3}}{4}-\frac {3 \sec \left (d x +c \right )}{8}\right ) \tan \left (d x +c \right )+\frac {3 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )}{d}-\frac {\left (6 a^{4} A +4 B \,a^{4}\right ) \left (-\frac {2}{3}-\frac {\sec \left (d x +c \right )^{2}}{3}\right ) \tan \left (d x +c \right )}{d}+\frac {B \,a^{4} \left (-\left (-\frac {\sec \left (d x +c \right )^{5}}{6}-\frac {5 \sec \left (d x +c \right )^{3}}{24}-\frac {5 \sec \left (d x +c \right )}{16}\right ) \tan \left (d x +c \right )+\frac {5 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{16}\right )}{d}+\frac {a^{4} A \tan \left (d x +c \right )}{d}\) | \(267\) |
derivativedivides | \(\frac {-a^{4} A \left (-\frac {8}{15}-\frac {\sec \left (d x +c \right )^{4}}{5}-\frac {4 \sec \left (d x +c \right )^{2}}{15}\right ) \tan \left (d x +c \right )+B \,a^{4} \left (-\left (-\frac {\sec \left (d x +c \right )^{5}}{6}-\frac {5 \sec \left (d x +c \right )^{3}}{24}-\frac {5 \sec \left (d x +c \right )}{16}\right ) \tan \left (d x +c \right )+\frac {5 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{16}\right )+4 a^{4} A \left (-\left (-\frac {\sec \left (d x +c \right )^{3}}{4}-\frac {3 \sec \left (d x +c \right )}{8}\right ) \tan \left (d x +c \right )+\frac {3 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )-4 B \,a^{4} \left (-\frac {8}{15}-\frac {\sec \left (d x +c \right )^{4}}{5}-\frac {4 \sec \left (d x +c \right )^{2}}{15}\right ) \tan \left (d x +c \right )-6 a^{4} A \left (-\frac {2}{3}-\frac {\sec \left (d x +c \right )^{2}}{3}\right ) \tan \left (d x +c \right )+6 B \,a^{4} \left (-\left (-\frac {\sec \left (d x +c \right )^{3}}{4}-\frac {3 \sec \left (d x +c \right )}{8}\right ) \tan \left (d x +c \right )+\frac {3 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )+4 a^{4} A \left (\frac {\sec \left (d x +c \right ) \tan \left (d x +c \right )}{2}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )-4 B \,a^{4} \left (-\frac {2}{3}-\frac {\sec \left (d x +c \right )^{2}}{3}\right ) \tan \left (d x +c \right )+a^{4} A \tan \left (d x +c \right )+B \,a^{4} \left (\frac {\sec \left (d x +c \right ) \tan \left (d x +c \right )}{2}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )}{d}\) | \(365\) |
default | \(\frac {-a^{4} A \left (-\frac {8}{15}-\frac {\sec \left (d x +c \right )^{4}}{5}-\frac {4 \sec \left (d x +c \right )^{2}}{15}\right ) \tan \left (d x +c \right )+B \,a^{4} \left (-\left (-\frac {\sec \left (d x +c \right )^{5}}{6}-\frac {5 \sec \left (d x +c \right )^{3}}{24}-\frac {5 \sec \left (d x +c \right )}{16}\right ) \tan \left (d x +c \right )+\frac {5 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{16}\right )+4 a^{4} A \left (-\left (-\frac {\sec \left (d x +c \right )^{3}}{4}-\frac {3 \sec \left (d x +c \right )}{8}\right ) \tan \left (d x +c \right )+\frac {3 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )-4 B \,a^{4} \left (-\frac {8}{15}-\frac {\sec \left (d x +c \right )^{4}}{5}-\frac {4 \sec \left (d x +c \right )^{2}}{15}\right ) \tan \left (d x +c \right )-6 a^{4} A \left (-\frac {2}{3}-\frac {\sec \left (d x +c \right )^{2}}{3}\right ) \tan \left (d x +c \right )+6 B \,a^{4} \left (-\left (-\frac {\sec \left (d x +c \right )^{3}}{4}-\frac {3 \sec \left (d x +c \right )}{8}\right ) \tan \left (d x +c \right )+\frac {3 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )+4 a^{4} A \left (\frac {\sec \left (d x +c \right ) \tan \left (d x +c \right )}{2}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )-4 B \,a^{4} \left (-\frac {2}{3}-\frac {\sec \left (d x +c \right )^{2}}{3}\right ) \tan \left (d x +c \right )+a^{4} A \tan \left (d x +c \right )+B \,a^{4} \left (\frac {\sec \left (d x +c \right ) \tan \left (d x +c \right )}{2}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )}{d}\) | \(365\) |
risch | \(-\frac {i a^{4} \left (840 A \,{\mathrm e}^{11 i \left (d x +c \right )}+735 B \,{\mathrm e}^{11 i \left (d x +c \right )}-240 A \,{\mathrm e}^{10 i \left (d x +c \right )}+3480 A \,{\mathrm e}^{9 i \left (d x +c \right )}+3845 B \,{\mathrm e}^{9 i \left (d x +c \right )}-4080 A \,{\mathrm e}^{8 i \left (d x +c \right )}-1920 B \,{\mathrm e}^{8 i \left (d x +c \right )}+2640 A \,{\mathrm e}^{7 i \left (d x +c \right )}+3750 B \,{\mathrm e}^{7 i \left (d x +c \right )}-13280 A \,{\mathrm e}^{6 i \left (d x +c \right )}-11520 B \,{\mathrm e}^{6 i \left (d x +c \right )}-2640 A \,{\mathrm e}^{5 i \left (d x +c \right )}-3750 B \,{\mathrm e}^{5 i \left (d x +c \right )}-15840 A \,{\mathrm e}^{4 i \left (d x +c \right )}-15360 B \,{\mathrm e}^{4 i \left (d x +c \right )}-3480 A \,{\mathrm e}^{3 i \left (d x +c \right )}-3845 B \,{\mathrm e}^{3 i \left (d x +c \right )}-7728 A \,{\mathrm e}^{2 i \left (d x +c \right )}-6912 B \,{\mathrm e}^{2 i \left (d x +c \right )}-840 \,{\mathrm e}^{i \left (d x +c \right )} A -735 B \,{\mathrm e}^{i \left (d x +c \right )}-1328 A -1152 B \right )}{120 d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{6}}-\frac {7 a^{4} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) A}{2 d}-\frac {49 a^{4} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) B}{16 d}+\frac {7 a^{4} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) A}{2 d}+\frac {49 a^{4} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) B}{16 d}\) | \(371\) |
(281/20*a^4*(8*A+7*B)/d*tan(1/2*d*x+1/2*c)^5-231/20*a^4*(8*A+7*B)/d*tan(1/ 2*d*x+1/2*c)^7+119/24*a^4*(8*A+7*B)/d*tan(1/2*d*x+1/2*c)^9-7/8*a^4*(8*A+7* B)/d*tan(1/2*d*x+1/2*c)^11+1/8*a^4*(200*A+207*B)/d*tan(1/2*d*x+1/2*c)-1/24 *a^4*(1864*A+1471*B)/d*tan(1/2*d*x+1/2*c)^3)/(-1+tan(1/2*d*x+1/2*c)^2)^6-7 /16*a^4*(8*A+7*B)/d*ln(tan(1/2*d*x+1/2*c)-1)+7/16*a^4*(8*A+7*B)/d*ln(tan(1 /2*d*x+1/2*c)+1)
Time = 0.28 (sec) , antiderivative size = 185, normalized size of antiderivative = 0.95 \[ \int \sec ^2(c+d x) (a+a \sec (c+d x))^4 (A+B \sec (c+d x)) \, dx=\frac {105 \, {\left (8 \, A + 7 \, B\right )} a^{4} \cos \left (d x + c\right )^{6} \log \left (\sin \left (d x + c\right ) + 1\right ) - 105 \, {\left (8 \, A + 7 \, B\right )} a^{4} \cos \left (d x + c\right )^{6} \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \, {\left (16 \, {\left (83 \, A + 72 \, B\right )} a^{4} \cos \left (d x + c\right )^{5} + 105 \, {\left (8 \, A + 7 \, B\right )} a^{4} \cos \left (d x + c\right )^{4} + 32 \, {\left (17 \, A + 18 \, B\right )} a^{4} \cos \left (d x + c\right )^{3} + 10 \, {\left (24 \, A + 41 \, B\right )} a^{4} \cos \left (d x + c\right )^{2} + 48 \, {\left (A + 4 \, B\right )} a^{4} \cos \left (d x + c\right ) + 40 \, B a^{4}\right )} \sin \left (d x + c\right )}{480 \, d \cos \left (d x + c\right )^{6}} \]
1/480*(105*(8*A + 7*B)*a^4*cos(d*x + c)^6*log(sin(d*x + c) + 1) - 105*(8*A + 7*B)*a^4*cos(d*x + c)^6*log(-sin(d*x + c) + 1) + 2*(16*(83*A + 72*B)*a^ 4*cos(d*x + c)^5 + 105*(8*A + 7*B)*a^4*cos(d*x + c)^4 + 32*(17*A + 18*B)*a ^4*cos(d*x + c)^3 + 10*(24*A + 41*B)*a^4*cos(d*x + c)^2 + 48*(A + 4*B)*a^4 *cos(d*x + c) + 40*B*a^4)*sin(d*x + c))/(d*cos(d*x + c)^6)
\[ \int \sec ^2(c+d x) (a+a \sec (c+d x))^4 (A+B \sec (c+d x)) \, dx=a^{4} \left (\int A \sec ^{2}{\left (c + d x \right )}\, dx + \int 4 A \sec ^{3}{\left (c + d x \right )}\, dx + \int 6 A \sec ^{4}{\left (c + d x \right )}\, dx + \int 4 A \sec ^{5}{\left (c + d x \right )}\, dx + \int A \sec ^{6}{\left (c + d x \right )}\, dx + \int B \sec ^{3}{\left (c + d x \right )}\, dx + \int 4 B \sec ^{4}{\left (c + d x \right )}\, dx + \int 6 B \sec ^{5}{\left (c + d x \right )}\, dx + \int 4 B \sec ^{6}{\left (c + d x \right )}\, dx + \int B \sec ^{7}{\left (c + d x \right )}\, dx\right ) \]
a**4*(Integral(A*sec(c + d*x)**2, x) + Integral(4*A*sec(c + d*x)**3, x) + Integral(6*A*sec(c + d*x)**4, x) + Integral(4*A*sec(c + d*x)**5, x) + Inte gral(A*sec(c + d*x)**6, x) + Integral(B*sec(c + d*x)**3, x) + Integral(4*B *sec(c + d*x)**4, x) + Integral(6*B*sec(c + d*x)**5, x) + Integral(4*B*sec (c + d*x)**6, x) + Integral(B*sec(c + d*x)**7, x))
Leaf count of result is larger than twice the leaf count of optimal. 464 vs. \(2 (180) = 360\).
Time = 0.22 (sec) , antiderivative size = 464, normalized size of antiderivative = 2.39 \[ \int \sec ^2(c+d x) (a+a \sec (c+d x))^4 (A+B \sec (c+d x)) \, dx=\frac {32 \, {\left (3 \, \tan \left (d x + c\right )^{5} + 10 \, \tan \left (d x + c\right )^{3} + 15 \, \tan \left (d x + c\right )\right )} A a^{4} + 960 \, {\left (\tan \left (d x + c\right )^{3} + 3 \, \tan \left (d x + c\right )\right )} A a^{4} + 128 \, {\left (3 \, \tan \left (d x + c\right )^{5} + 10 \, \tan \left (d x + c\right )^{3} + 15 \, \tan \left (d x + c\right )\right )} B a^{4} + 640 \, {\left (\tan \left (d x + c\right )^{3} + 3 \, \tan \left (d x + c\right )\right )} B a^{4} - 5 \, B a^{4} {\left (\frac {2 \, {\left (15 \, \sin \left (d x + c\right )^{5} - 40 \, \sin \left (d x + c\right )^{3} + 33 \, \sin \left (d x + c\right )\right )}}{\sin \left (d x + c\right )^{6} - 3 \, \sin \left (d x + c\right )^{4} + 3 \, \sin \left (d x + c\right )^{2} - 1} - 15 \, \log \left (\sin \left (d x + c\right ) + 1\right ) + 15 \, \log \left (\sin \left (d x + c\right ) - 1\right )\right )} - 120 \, A a^{4} {\left (\frac {2 \, {\left (3 \, \sin \left (d x + c\right )^{3} - 5 \, \sin \left (d x + c\right )\right )}}{\sin \left (d x + c\right )^{4} - 2 \, \sin \left (d x + c\right )^{2} + 1} - 3 \, \log \left (\sin \left (d x + c\right ) + 1\right ) + 3 \, \log \left (\sin \left (d x + c\right ) - 1\right )\right )} - 180 \, B a^{4} {\left (\frac {2 \, {\left (3 \, \sin \left (d x + c\right )^{3} - 5 \, \sin \left (d x + c\right )\right )}}{\sin \left (d x + c\right )^{4} - 2 \, \sin \left (d x + c\right )^{2} + 1} - 3 \, \log \left (\sin \left (d x + c\right ) + 1\right ) + 3 \, \log \left (\sin \left (d x + c\right ) - 1\right )\right )} - 480 \, A a^{4} {\left (\frac {2 \, \sin \left (d x + c\right )}{\sin \left (d x + c\right )^{2} - 1} - \log \left (\sin \left (d x + c\right ) + 1\right ) + \log \left (\sin \left (d x + c\right ) - 1\right )\right )} - 120 \, B a^{4} {\left (\frac {2 \, \sin \left (d x + c\right )}{\sin \left (d x + c\right )^{2} - 1} - \log \left (\sin \left (d x + c\right ) + 1\right ) + \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + 480 \, A a^{4} \tan \left (d x + c\right )}{480 \, d} \]
1/480*(32*(3*tan(d*x + c)^5 + 10*tan(d*x + c)^3 + 15*tan(d*x + c))*A*a^4 + 960*(tan(d*x + c)^3 + 3*tan(d*x + c))*A*a^4 + 128*(3*tan(d*x + c)^5 + 10* tan(d*x + c)^3 + 15*tan(d*x + c))*B*a^4 + 640*(tan(d*x + c)^3 + 3*tan(d*x + c))*B*a^4 - 5*B*a^4*(2*(15*sin(d*x + c)^5 - 40*sin(d*x + c)^3 + 33*sin(d *x + c))/(sin(d*x + c)^6 - 3*sin(d*x + c)^4 + 3*sin(d*x + c)^2 - 1) - 15*l og(sin(d*x + c) + 1) + 15*log(sin(d*x + c) - 1)) - 120*A*a^4*(2*(3*sin(d*x + c)^3 - 5*sin(d*x + c))/(sin(d*x + c)^4 - 2*sin(d*x + c)^2 + 1) - 3*log( sin(d*x + c) + 1) + 3*log(sin(d*x + c) - 1)) - 180*B*a^4*(2*(3*sin(d*x + c )^3 - 5*sin(d*x + c))/(sin(d*x + c)^4 - 2*sin(d*x + c)^2 + 1) - 3*log(sin( d*x + c) + 1) + 3*log(sin(d*x + c) - 1)) - 480*A*a^4*(2*sin(d*x + c)/(sin( d*x + c)^2 - 1) - log(sin(d*x + c) + 1) + log(sin(d*x + c) - 1)) - 120*B*a ^4*(2*sin(d*x + c)/(sin(d*x + c)^2 - 1) - log(sin(d*x + c) + 1) + log(sin( d*x + c) - 1)) + 480*A*a^4*tan(d*x + c))/d
Time = 0.36 (sec) , antiderivative size = 280, normalized size of antiderivative = 1.44 \[ \int \sec ^2(c+d x) (a+a \sec (c+d x))^4 (A+B \sec (c+d x)) \, dx=\frac {105 \, {\left (8 \, A a^{4} + 7 \, B a^{4}\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right ) - 105 \, {\left (8 \, A a^{4} + 7 \, B a^{4}\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right ) - \frac {2 \, {\left (840 \, A a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{11} + 735 \, B a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{11} - 4760 \, A a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{9} - 4165 \, B a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{9} + 11088 \, A a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 9702 \, B a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 13488 \, A a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 11802 \, B a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 9320 \, A a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 7355 \, B a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 3000 \, A a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 3105 \, B a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )}^{6}}}{240 \, d} \]
1/240*(105*(8*A*a^4 + 7*B*a^4)*log(abs(tan(1/2*d*x + 1/2*c) + 1)) - 105*(8 *A*a^4 + 7*B*a^4)*log(abs(tan(1/2*d*x + 1/2*c) - 1)) - 2*(840*A*a^4*tan(1/ 2*d*x + 1/2*c)^11 + 735*B*a^4*tan(1/2*d*x + 1/2*c)^11 - 4760*A*a^4*tan(1/2 *d*x + 1/2*c)^9 - 4165*B*a^4*tan(1/2*d*x + 1/2*c)^9 + 11088*A*a^4*tan(1/2* d*x + 1/2*c)^7 + 9702*B*a^4*tan(1/2*d*x + 1/2*c)^7 - 13488*A*a^4*tan(1/2*d *x + 1/2*c)^5 - 11802*B*a^4*tan(1/2*d*x + 1/2*c)^5 + 9320*A*a^4*tan(1/2*d* x + 1/2*c)^3 + 7355*B*a^4*tan(1/2*d*x + 1/2*c)^3 - 3000*A*a^4*tan(1/2*d*x + 1/2*c) - 3105*B*a^4*tan(1/2*d*x + 1/2*c))/(tan(1/2*d*x + 1/2*c)^2 - 1)^6 )/d
Time = 16.34 (sec) , antiderivative size = 262, normalized size of antiderivative = 1.35 \[ \int \sec ^2(c+d x) (a+a \sec (c+d x))^4 (A+B \sec (c+d x)) \, dx=\frac {\left (-7\,A\,a^4-\frac {49\,B\,a^4}{8}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{11}+\left (\frac {119\,A\,a^4}{3}+\frac {833\,B\,a^4}{24}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9+\left (-\frac {462\,A\,a^4}{5}-\frac {1617\,B\,a^4}{20}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7+\left (\frac {562\,A\,a^4}{5}+\frac {1967\,B\,a^4}{20}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+\left (-\frac {233\,A\,a^4}{3}-\frac {1471\,B\,a^4}{24}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+\left (25\,A\,a^4+\frac {207\,B\,a^4}{8}\right )\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{12}-6\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}+15\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8-20\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+15\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4-6\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}+\frac {7\,a^4\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )\,\left (8\,A+7\,B\right )}{8\,d} \]
(tan(c/2 + (d*x)/2)*(25*A*a^4 + (207*B*a^4)/8) - tan(c/2 + (d*x)/2)^11*(7* A*a^4 + (49*B*a^4)/8) + tan(c/2 + (d*x)/2)^9*((119*A*a^4)/3 + (833*B*a^4)/ 24) - tan(c/2 + (d*x)/2)^3*((233*A*a^4)/3 + (1471*B*a^4)/24) - tan(c/2 + ( d*x)/2)^7*((462*A*a^4)/5 + (1617*B*a^4)/20) + tan(c/2 + (d*x)/2)^5*((562*A *a^4)/5 + (1967*B*a^4)/20))/(d*(15*tan(c/2 + (d*x)/2)^4 - 6*tan(c/2 + (d*x )/2)^2 - 20*tan(c/2 + (d*x)/2)^6 + 15*tan(c/2 + (d*x)/2)^8 - 6*tan(c/2 + ( d*x)/2)^10 + tan(c/2 + (d*x)/2)^12 + 1)) + (7*a^4*atanh(tan(c/2 + (d*x)/2) )*(8*A + 7*B))/(8*d)